#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
using namespace std;

void cmdLineParse(const string& str)
{
    string tmp = "";
    vector<string> vs;
    bool flag = false;
    for (int i = 0; i < str.size(); i++) {
        if (str[i] == '"') {
            flag = !flag;
        }
        else if (str[i] == ' ' && !flag) {
            vs.push_back(tmp);
            tmp.clear();
        }
        else {
            tmp += str[i];
        }
    }
    vs.push_back(tmp);
    cout << vs.size() << endl;
    for (int i = 0; i < vs.size(); i++) {
        cout << vs[i] << endl;
    }
}

int main()
{
    string str;
    while (getline(cin, str)) {
        cmdLineParse(str);
    }
    return 0;
}